package com.cnnp.dip.present.controller;

import com.cnnp.dip.business.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("/api/java/search")
public class SearchController {

    @Autowired
    private SearchService searchService;

    @GetMapping
    public ResponseEntity<?> queryDashboards(){
        List<Map<String, Object>> maps =  searchService.searchDashboards();
        return ResponseEntity.ok(maps);
    }
}
